import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/basic_information/change_overhaul_record_entity.dart';

ChangeOverhaulRecordEntity $ChangeOverhaulRecordEntityFromJson(Map<String, dynamic> json) {
  final ChangeOverhaulRecordEntity changeOverhaulRecordEntity = ChangeOverhaulRecordEntity();
  final String? changeOverhaulDate = jsonConvert.convert<String>(json['changeOverhaulDate']);
  if (changeOverhaulDate != null) {
    changeOverhaulRecordEntity.changeOverhaulDate = changeOverhaulDate;
  }
  final String? changeOverhaulPerson = jsonConvert.convert<String>(json['changeOverhaulPerson']);
  if (changeOverhaulPerson != null) {
    changeOverhaulRecordEntity.changeOverhaulPerson = changeOverhaulPerson;
  }
  final String? changeOverhaulPersonId = jsonConvert.convert<String>(json['changeOverhaulPersonId']);
  if (changeOverhaulPersonId != null) {
    changeOverhaulRecordEntity.changeOverhaulPersonId = changeOverhaulPersonId;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    changeOverhaulRecordEntity.companyCode = companyCode;
  }
  final String? componentId = jsonConvert.convert<String>(json['componentId']);
  if (componentId != null) {
    changeOverhaulRecordEntity.componentId = componentId;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    changeOverhaulRecordEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    changeOverhaulRecordEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    changeOverhaulRecordEntity.createDate = createDate;
  }
  final String? deadline = jsonConvert.convert<String>(json['deadline']);
  if (deadline != null) {
    changeOverhaulRecordEntity.deadline = deadline;
  }
  final String? deadlineStatus = jsonConvert.convert<String>(json['deadlineStatus']);
  if (deadlineStatus != null) {
    changeOverhaulRecordEntity.deadlineStatus = deadlineStatus;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    changeOverhaulRecordEntity.deleted = deleted;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    changeOverhaulRecordEntity.id = id;
  }
  final String? notes = jsonConvert.convert<String>(json['notes']);
  if (notes != null) {
    changeOverhaulRecordEntity.notes = notes;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    changeOverhaulRecordEntity.type = type;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    changeOverhaulRecordEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    changeOverhaulRecordEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    changeOverhaulRecordEntity.updateDate = updateDate;
  }
  return changeOverhaulRecordEntity;
}

Map<String, dynamic> $ChangeOverhaulRecordEntityToJson(ChangeOverhaulRecordEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['changeOverhaulDate'] = entity.changeOverhaulDate;
  data['changeOverhaulPerson'] = entity.changeOverhaulPerson;
  data['changeOverhaulPersonId'] = entity.changeOverhaulPersonId;
  data['companyCode'] = entity.companyCode;
  data['componentId'] = entity.componentId;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deadline'] = entity.deadline;
  data['deadlineStatus'] = entity.deadlineStatus;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['notes'] = entity.notes;
  data['type'] = entity.type;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension ChangeOverhaulRecordEntityExtension on ChangeOverhaulRecordEntity {
  ChangeOverhaulRecordEntity copyWith({
    String? changeOverhaulDate,
    String? changeOverhaulPerson,
    String? changeOverhaulPersonId,
    String? companyCode,
    String? componentId,
    String? createBy,
    String? createById,
    String? createDate,
    String? deadline,
    String? deadlineStatus,
    String? deleted,
    String? id,
    String? notes,
    String? type,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return ChangeOverhaulRecordEntity()
      ..changeOverhaulDate = changeOverhaulDate ?? this.changeOverhaulDate
      ..changeOverhaulPerson = changeOverhaulPerson ?? this.changeOverhaulPerson
      ..changeOverhaulPersonId = changeOverhaulPersonId ?? this.changeOverhaulPersonId
      ..companyCode = companyCode ?? this.companyCode
      ..componentId = componentId ?? this.componentId
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deadline = deadline ?? this.deadline
      ..deadlineStatus = deadlineStatus ?? this.deadlineStatus
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..notes = notes ?? this.notes
      ..type = type ?? this.type
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
